home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Found / FWNotifn / Include / FWNotifr.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  2.2 KB  |  90 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWNotifr.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWNOTIFR_H
  11. #define FWNOTIFR_H
  12.  
  13. #ifndef FWRUNTYP_H
  14. #include "FWRunTyp.h"
  15. #endif
  16.  
  17. #ifndef FWINTERE_H
  18. #include "FWIntere.h"
  19. #endif
  20.  
  21. #ifndef FWEXCLIB_H
  22. #include "FWExcLib.h"
  23. #endif
  24.  
  25. #ifndef FWTCOLL_H
  26. #include "FWTColl.h"
  27. #endif
  28.  
  29. #ifndef    __SOM__
  30. #include <som.xh>
  31. #endif
  32.  
  33. //========================================================================================
  34. // Forward declarations
  35. //========================================================================================
  36.  
  37. class FW_MReceiver;
  38. class FW_CNotification;
  39.  
  40. //========================================================================================
  41. // Struct FW_SPrivInterestReceiver
  42. //========================================================================================
  43.  
  44. struct FW_SPrivInterestReceiver
  45. {
  46.     FW_CInterest*    fInterest;
  47.     FW_MReceiver*    fReceiver;
  48. };
  49.  
  50. //========================================================================================
  51. // CLASS FW_MNotifier
  52. //========================================================================================
  53.  
  54. class FW_MNotifier
  55. {
  56. public:
  57.     FW_DECLARE_CLASS
  58.     FW_DECLARE_AUTO(FW_MNotifier)
  59.  
  60.     friend class FW_CNotifierInterestIterator;
  61.     
  62. //----------------------------------------------------------------------------------------
  63. //    Constructors/Destructor
  64. //
  65. public:
  66.     virtual ~FW_MNotifier();
  67.  
  68. protected:
  69.     FW_MNotifier();
  70.     
  71. //----------------------------------------------------------------------------------------
  72. //    API
  73. //    
  74. public:
  75.     virtual void        Notify(Environment* ev, const FW_CNotification ¬ification);
  76.     
  77.     virtual void        AddReceiver(FW_MReceiver* Receiver, FW_CInterest* interest);
  78.     virtual void        RemoveReceiver(FW_MReceiver* receiver, const FW_CInterest& interest);
  79.     
  80.     FW_Boolean            IsConnectedTo(FW_MReceiver* receiver, const FW_CInterest& interest);
  81.  
  82. //----------------------------------------------------------------------------------------
  83. //    Data Members
  84. //
  85. private:
  86.     FW_TOrderedCollection<FW_SPrivInterestReceiver>    fInterestList;
  87. };
  88.  
  89. #endif
  90.